package de.home.develop.firstgame.logic
{	

	public class CommandHelper
	{
		
		public static const START_GAME:int = 0;
		public static const SET_POSITION:int = 1;
		public static const SET_PLAYER:int = 2;
		
		
		
		
		public static function writePosition(x: Number, y:Number):String
		{
			return "ID:1337"+"X:"+x+"Y:"+y+"\n";
		}
		
		public  static function parseCommand(cmd:String):int
		{
			
			if(cmd.indexOf("START") != -1)
			{
				return 0;
			}
			
			if(cmd.indexOf("SETPOS") != -1)
			{
				return 1;
			}
			if(cmd.indexOf("SETPLAYER") != -1)
			{
				return 2;
			}
			return -1;
		}
		
		
		public function CommandHelper()
		{
		}
	}
}

